package com.dayuanit.dy14.atm.demo2.dy14atmdao.mapper;

import com.dayuanit.dy14.atm.demo2.dy14atmdao.entity.Card;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CardMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Card record);

    int insertSelective(Card record);

    Card selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Card record);

    int updateByPrimaryKey(Card record);

    List<Card> listCardByUserId(Integer userId);

    int updateBalance(@Param("cardId") Integer cardId,
                      @Param("oldBalance")String oldBalance,
                      @Param("newBalance")String newBalance);

    Card getCard4Lock(Integer cardId);
}